﻿package 
{
	import flash.events.*;
	import flash.display.*;

	
	class EventProc{   //事件处理类
		function EventProc(hMain:Sprite){
			trace(hMain.numChildren);
			trace(hMain.getChildAt(0));
			trace(hMain.getChildAt(1));
			//var m:MovieClip=MovieClip(hMain.getChildAt(1));
			//m.gotoAndStop(2);
			}
		/*public const UP:uint=0;
		public const DOWN:uint=1;
		public const LEFT:uint=2;
		public const RIGHT:uint=3;*/
		
		/*function keyUpHandler(event:KeyboardEvent):void{          //处理键盘事件
			Main.myText.text ="键盘按下:"+event.charCode+"\nx:"+Main.Main.player.x+",y:"+Main.Main.player.y;
			
			if(Main.player.x<0)Main.player.x=420;
			if(Main.player.x>420)Main.player.x=0;
			if(Main.player.y<0)Main.player.y=270;
			if(Main.player.y>270)Main.player.y=0;
			
			switch(String.fromCharCode(event.charCode))
			{
				case 'w':Main.player.y-=5;break;
				case 's':Main.player.y+=5;break;
				case 'a':Main.player.x-=5;break;
				case 'd':Main.player.x+=5;break;
			}
		}*/
		
	}
}